package smartcase.base;

import smartcase.base.file.FileStruct;
import smartcase.base.log.LogStruct;

import java.lang.reflect.Type;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Supplier;

public interface ConfigurationDefine {

  String getModule();

  default ReloadConfigEnum getReloadConfigEnum() {
    return ReloadConfigEnum.LOCAL;
  }

  String getConfigFilePath();

  Consumer<LogStruct> getLogConsumer();

  Supplier<Type> getApiResponseType();

  Supplier<Object> createApiResponse();

  Function<FileStruct, Boolean> getFileUploader();

  HotLoadConfiguration getHotLoadConfiguration();

  default TimeUnit getReloadConfigurationTimeUnit() {
    return TimeUnit.MINUTES;
  }

  Consumer<LogStruct> alarm();
}
